package RPS;

import java.util.ArrayList;

public class Player 
{
	private String name;
	private int score;
	private ArrayList<RPSEnum> moves;
	
	public Player(String name, ArrayList<RPSEnum> moves)
	{
		this.name = name;
		this.score = 0;	
		this.moves = moves;
	}
	
	//---Adding random/predefined enumerations to an ArrayList of moves
	//---Because we couldn't figure out how to generate random enumeration, 
	//---so we changed a little bit the constructor
	public void contructList(int p)
	{	
		if(p%2 == 0)
		{		
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.PAPERS);
			this.moves.add(RPSEnum.PAPERS);
			this.moves.add(RPSEnum.PAPERS);
			this.moves.add(RPSEnum.ROCK);
			this.moves.add(RPSEnum.ROCK);
			this.moves.add(RPSEnum.ROCK);
		}
		
		else
		{
			this.moves.add(RPSEnum.PAPERS);
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.ROCK);
			this.moves.add(RPSEnum.ROCK);
			this.moves.add(RPSEnum.PAPERS);
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.SCISSORS);
			this.moves.add(RPSEnum.ROCK);
			this.moves.add(RPSEnum.PAPERS);
		}
	}
	
	public void setScore(int s)
	{
		this.score = s;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public int getScore()
	{
		return this.score;
	}
	
	public RPSEnum getMoves(int ind)
	{
		return this.moves.get(ind);
	}
	
	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub

	}

}
